package com.tchy.cloud.entity;

import org.jeecgframework.web.system.pojo.base.TSBaseUser;
import org.jeecgframework.web.system.pojo.base.TSUser;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Created by xiaoji on 2017/2/20.
 */
@Entity
@Table(name = "a_coupon_template", schema = "", catalog = "")
public class ACouponTemplateEntity {
    private Long templateId;
    private String logo;
    private String name;
    private Byte type;
    private Integer templateValue;
    private Byte isVality;
//    private String creator;
    private TSBaseUser user;
    private BigDecimal conditional;
    private Date createTime;
//    private Date validityTime;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "template_id")
    public Long getTemplateId() {
        return templateId;
    }

    public void setTemplateId(Long templateId) {
        this.templateId = templateId;
    }

    @Basic
    @Column(name = "logo")
    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "type")
    public Byte getType() {
        return type;
    }

    public void setType(Byte type) {
        this.type = type;
    }

    @Basic
    @Column(name = "template_value")
    public Integer getTemplateValue() {
        return templateValue;
    }

    public void setTemplateValue(Integer templateValue) {
        this.templateValue = templateValue;
    }

    @Basic
    @Column(name = "is_vality")
    public Byte getIsVality() {
        return isVality;
    }

    public void setIsVality(Byte isVality) {
        this.isVality = isVality;
    }


    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "creator")
    public TSBaseUser getUser() {
        return user;
    }

    public void setUser(TSBaseUser user) {
        this.user = user;
    }


    //    @Basic
//    @Column(name = "creator")
//    public String getCreator() {
//        return creator;
//    }
//
//    public void setCreator(String creator) {
//        this.creator = creator;
//    }

    @Basic
    @Column(name = "conditional")
    public BigDecimal getConditional() {
        return conditional;
    }

    public void setConditional(BigDecimal conditional) {
        this.conditional = conditional;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

//    @Basic
//    @Column(name = "validity_time")
//    public Date getValidityTime() {
//        return validityTime;
//    }
//
//    public void setValidityTime(Date validityTime) {
//        this.validityTime = validityTime;
//    }
}
